



use "${pathdata_baseline}/StatisticsQualitativeContent.dta", clear



************* Table 1: Regressions with several datasets


*indicator = 1 if in story treatment
gen stat_with_context = 0 
replace stat_with_context = 1 if inlist(treatment, "n>1_context")


preserve
	
	
	
	*only keep consistent stories
	keep if story_type == "consistent"
	
	eststo clear
	*Column (I): immediate effect (Y) stat_with_context dummy (X)
	eststo reg1: areg effect stat_with_context, absorb(prolific_pid) cluster(prolific_pid)
	estadd scalar x = _b[_cons]


	*Column (II): delayed effect (Y) stat_with_context dummy (X)
	eststo reg2: areg effect_recall stat_with_context, absorb(prolific_pid) cluster(prolific_pid)
	estadd scalar x = _b[_cons]
	
	
restore


preserve
	
	
	gen id= _n
	
	*Make the data long to have both immediate and delayed Belief Impact in one column
	reshape long effec, i(id) j(delay) string
	
	*only keep consistent stories

	*indicator = 1 if delayed Belief Impact
	gen delaydum = 0
	replace delaydum = 1 if delay =="t_recall"
	label variable delaydum "Delay"
	
	gen stat_with_contextXdelay = 0
	replace stat_with_contextXdelay = 1 if stat_with_context == 1 & delaydum == 1

	rename effec effect_total

	*Column (III): Belief Impact delay and immediate pooled (Y) delay and stat_with_context indicators (X)
	eststo reg3: areg effect_total stat_with_context delaydum stat_with_contextXdelay, absorb(prolific_pid) cluster(prolific_pid)
	estadd scalar x = _b[_cons]
	


restore


preserve 

	eststo reg4: reg correct_recall stat_with_context , cluster(prolific_pid) r
	estadd scalar x = _b[_cons]

restore

	


	
	
	esttab reg1 reg2 reg3 reg4 using "${pathout_baseline}/tables/tableA9.tex", ///
		booktabs nonotes replace label nomtitles ///
		keep(stat_with_context delaydum stat_with_contextXdelay) order(stat_with_context delaydum stat_with_contextXdelay) coeflabels( stat_with_context "Statistic with Context" delaydum "Delay" stat_with_contextXdelay "Statistic with Context $/times$ Delay" _cons "Control Mean") ///
		se(2) b(a2) stats(x N r2, fmt(2 0 2) label("Control Mean" "Observations" "R^2")) star(* 0.10 ** 0.05 *** 0.01) ///
		prehead("{\begin{tabular}{l*{4}{c}}\toprule\toprule&\multicolumn{4}{c}{\textit{Dependent variable:}}//[.1cm] &\multicolumn{3}{c}{Belief Impact} &\multicolumn{1}{c}{Correct Recall} // \cmidrule(lr){2-4} \cmidrule(lr){5-5} // \textit{Sample:} &\multicolumn{1}{c}{Immediate} &\multicolumn{1}{c}{Delay} &\multicolumn{1}{c}{Pooled} &\multicolumn{1}{c}{All} //")
		
		
		
		
		
 eststo clear
 

